﻿using System;
using System.Collections.Generic;

namespace CDV.IRMS.WebAPI.TaskExecution.Data
{
    /// <summary>
    /// RESTful接口定义对象
    /// </summary>
    public class RESTfulAPI
    {
        /// <summary>
        /// 默认连接超时时间(5秒)
        /// </summary>
        public const int DefaultTimeout = 5;

        /// <summary>
        /// 基地址
        /// </summary>
        public string BaseURL { get; set; }

        /// <summary>
        /// 请求超时时间（单位：秒）
        /// </summary>
        public TimeSpan TimeOut { get; set; } = new TimeSpan(0, 0, DefaultTimeout);

        /// <summary>
        /// Action地址映射
        /// </summary>
        public IDictionary<string, string> APIMap { get; set; }
    }
}
